package com.self.admin.controller;

import com.self.admin.model.SysUser;
import com.self.admin.service.SysUserService;
import com.self.common.response.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version v1.0
 * @ClassName: TestController
 * @Description:
 * @Author: Mac
 * @Date: 2022/5/29 23:27
 */
@RestController
public class TestController {

    @Autowired
    private SysUserService sysUserService;

    @GetMapping("/test/sys-user/{id}")
    public R<SysUser> getSysUser(@PathVariable("id") Long id){
        SysUser byId = sysUserService.getById(id);
        return R.ok(byId);
    }
}
